<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:77:"C:\phpstudy\WWW\tea\public/../application/feedback\view\feedback\comment.html";i:1532932890;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>意见与建议</title>

    <meta name="keywords" content="">
    <meta name="description" content="">

    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

    <link rel="shortcut icon" href="favicon.ico"> <link href="/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/static/css/animate.css" rel="stylesheet">
    <link href="/static/css/style.css?v=4.1.0" rel="stylesheet">
</head>
<style type="text/css">
    tr,td,th{
        text-align: center;
    }
</style>
<body>

<div class="ibox-content">
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>问题分类</th>
                <th>建议内容</th>
                <th>姓名</th>
                <th>性别</th>
                <th>联系方式</th>
                <th>号码</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($data as $d): ?>
            <tr>
                <th>
                    <?php switch($d['problem']): case "1": ?><span style="color: blue">技术问题<span><?php break; case "2": ?><span style="color: yellow">内容问题<span><?php break; default: ?>未知
                    <?php endswitch; ?>
                </th>
                <th><?php echo $d['comment']; ?></th>
                <th><?php echo $d['name']; ?></th>
                <th>
                    <?php switch($d['sex']): case "1": ?>男<?php break; case "2": ?>女<?php break; default: ?>未知
                    <?php endswitch; ?>
                </th>
                <th>
                    <?php switch($d['fs']): case "1": ?>微信<?php break; case "2": ?>手机<?php break; default: ?>未知
                    <?php endswitch; ?>
                </th>
                <th><?php echo $d['contact']; ?></th>
                <th>
                    <?php switch($d['status']): case "0": ?><button onclick="getstatus('<?php echo $d['Id']; ?>')">未解决</button><?php break; case "1": ?><span style="color: green">已解决<span><?php break; default: ?>未知
                    <?php endswitch; ?>
                </th>
            </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

</div>


<!-- 全局js -->
<script src="/static/js/jquery.min.js?v=2.1.4"></script>
<script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/static/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="/static/js/hAdmin.js?v=4.1.0"></script>
<script type="text/javascript" src="/static/js/index.js"></script>

<!-- 第三方插件 -->
<script src="/static/js/plugins/pace/pace.min.js"></script>
<script type="text/javascript">
    function getstatus(id){
        var url = '<?php echo url("updatacomment"); ?>';
        var data = {id:id};
        $.post(url,data,function(res){
            if(res==1){
                alert('问题已解决');
            }else{
                alert('问题未解决');
            }
        window.location.replace('<?php echo url("comment"); ?>')
        })
    }
</script>

</body>
</html>